oxenstored: make --restart option best-effort
authorJonathan Davies <jonathan.davies@citrix.com>
Fri, 7 Apr 2017 13:27:22 +0000 (14:27 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 10 Apr 2017 13:46:45 +0000 (14:46 +0100)
commitce70926b4f88d3f7510bd4699dc7fc3996539084
treef405363934214beb6ed8c94130da2638817e2f27
parent3475c97ee4a6442587d86b5cd0926614c1fb2939
oxenstored: make --restart option best-effort

Only attempt to restore from saved state if it exists.

Without this, oxenstored immediately exits with an exception if the
--restart option is provided but the state file is not present.

(The time-of-check to time-of-use race isn't a concern as oxenstored is
the only thing that should write the state file.)

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Christian Lindig <christian.lindig@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
tools/ocaml/xenstored/xenstored.ml